const a = 1518365215;
let d = new Date();
// console.log(a);
console.log(d)
let e = `${d.getFullYear()}${d.getDate()}${d.getDay()}`
console.log(e)
console.log(d.toTimeString())
console.log(d.toDateString())
console.log(d.valueOf())

var str = 1404172800000;
var f = new Date(str).toISOString();
console.log(f)
// if (new Date(str).toDateString() === new Date().toDateString()) {
//     //今天
// } else if (new Date(str) < new Date()){
//     //之前
//     console.log(new Date(str).toISOString().slice(0,10));//2014-07-01
// }

// d.setDate(15)
// console.log(d)

var day=new Date().getDay();
console.log(day)
switch (day)
{
    case 0:
        x="Today it's Sunday";
        break;
    case 1:
        x="Today it's Monday";
        break;
    case 2:
        x="Today it's Tuesday";
        break;
    case 3:
        x="Today it's Wednesday";
        break;
    case 4:
        x="Today it's Thursday";
        break;
    case 5:
        x="Today it's Friday";
        break;
    case 6:
        x="Today it's Saturday";
        break;
}